package com.antler.smt.portal.service.impl;

import com.antler.smt.portal.mapper.PurchaserAccountInfoMapper;
import com.antler.smt.portal.mapper.PurchaserInfoMapper;
import com.antler.smt.response.base.Result;
import com.antler.smt.service.portal.StarLevelService;
import com.antler.smt.utils.LogUtil;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 计算星级 TODO
 *
 * @author zhangyi
 * @date 2018/4/27 15:54
 */
@Service
public class StarLevelServiceImpl implements StarLevelService {

    /**
     * 日志
     */
    private static Logger log = LogUtil.get();

    @Autowired
    private PurchaserAccountInfoMapper purchaserAccountInfoMapper;


    /**
     *  获取星级
     *
     * @param memberId 会员id
     * @return
     */
    @Override
    public Result<Integer> getStar(Long memberId) {
        Result result = null;

        Integer star = purchaserAccountInfoMapper.getStar(memberId);

        result = new Result(star);

        return result;
    }

    /**
     * 获取下次消费金额多少(写在了PurchaserServiceImpl里面了)
     *
     * @param memberId 会员id
     * @return
     */
    @Override
    public Result<Integer> getNextStarMoney(Long memberId) {
        Result result = null;


        return null;
    }
}
